// 使用示例
loadScript('https://game.zixia.com/js/dianjipay.js', function(err) {
    if (err) {
        console.error('加载出错');
    } else {
        console.log('加载成功');
        // 在这里使用加载的库
        // 登录
        zixia_login();
        console.log("是否打开游戏：",open_game);
    }
});

function zixia_login(){
    var queryParams = getQueryParams();
    console.log(queryParams);
    queryParams.cid = cid;
    queryParams.gid = gid;
    faXingLogin(queryParams);
}

function getQueryParams() {
    var urlParams = new URLSearchParams(window.location.search);
    var params = {};
    for (var param of urlParams.entries()) {
        params[param[0]] = param[1];
    }
    return params;
}



function zixia_creterole(data){
    $.post(feihuo_creteroleUlr,data,function(info) {
        console.log("角色结果:",info);
    });
}



function zixia_pay(data){
    console.log("zixia支付数据：",data);
    ziXiaToPay.GetToPayUrl(data);
}
